package fun.fanyu.mygpt.controller;

import com.sun.deploy.util.StringUtils;
import fun.fanyu.mygpt.controller.in.StaffIn;
import fun.fanyu.mygpt.controller.out.UserOut;
import org.springframework.http.HttpHeaders;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @version V3.0
 * @Title: StaffController
 * @Description: 员工
 * @author: Trident
 * @date 2023/7/6 12:05 PM
 */
@RestController
@CrossOrigin(origins = "*")
public class StaffController {

    @PostMapping("/header_test")
    public UserOut headerTest(@RequestHeader HttpHeaders headers, @RequestBody StaffIn staffIn) {
        List<String> list = headers.get("token");
        String token = StringUtils.join(list, "");
        System.out.printf(token);
        return new UserOut();
    }
}
